package com.service;

import com.entity.Cart;
import com.entity.Foods;
import com.entity.Like;
import com.entity.Orders;

import java.util.List;
import java.util.Map;

public interface FoodsService {
    //查询所有食物
    List<Foods> foodsFindAll();
    List<Map<String,Object>> foodFindAll();
    //按id查询点赞数量
    List<Like> findLike();
    //按用户id查询是否点赞
    List<Like> findUserLove();
    //菜单列表分页查询
    List<Foods> foodList(int pageIndex, int pageSize);
    int getPageCount(int pageSize);
    //查询三个点赞最多的食物信息
    List<Map<String, Object>> findThree();
    int findFoodLike(int customerId,int foodId);
    int foodGiveLike(int customerId,int foodId);
    int foodCancelLike(int customerId1, int foodId1);
    //按照id查询食物信息
    List<Map<String, Object>> findId(int foodsId);
    List<Map<String, Object>> likeId(int likeId);
    List<Map<String, Object>> typeId(int typeId);
    int updataCart(int price,int number,int userId,int foodId,int size,String fall);
    List<Cart> findCart(int userId);
    List<Map<String, Object>> listCart(int price,int number,int userId,int foodId,int size);
    int updetaNumber(int listCartId,int number);
    int removeCart(int listCartId);
    //根据id获取食物信息
    Foods getById(long id);
    int deleteFood(int id);
    int modify(Foods foods);
    int add(String name,String photo,int price,String describe,int type_id);
    List<Map<String, Object>> bgFoodsFindAll(int pageIndex, int pageSize);
    List<Map<String, Object>> bgFoodGetByID(int foodId);
    List<Map<String, Object>> bgFoodGetByName(String foodName);
    int addOrder(int userId);
    Orders orderById(int id);
    List<Map<String, Object>> getOrderByUserId(int userId);
}
